<?php
/*
 * Created on Sep 12, 2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */

require('./View/ViewFunctions.php');
require('./View/Security.php');
require('./Controller/HelperCheck.php');
//echo var_dump ($_GET);
echo "Editing " . $_GET['edit'];
if($_GET['edit'] =="Container") {
	$select = createDropDownBox("SELECT Tank, Tower, Position, id FROM Container ORDER BY Tank ASC, Tower ASC, Position ASC",0 , "id");
} 
	elseif($_GET['edit'] == 'CellType' ) {
	$select = createDropDownBox("SELECT Name, id FROM CellType ORDER BY Name ASC",0 , "id");
	 } elseif($_GET['edit'] == 'Modification') {		 	
	$select =createDropDownBox("SELECT Name, id FROM Modification ORDER BY Name ASC",0 , "id");
	} elseif($_GET['edit'] == 'Researcher') {			
	$select = createDropDownBox("SELECT Name, id FROM Researcher ORDER BY Name ASC",0 , "id");
	} elseif($_GET['edit'] == 'ContainerType') {			
	$select = createDropDownBox("SELECT Description, id FROM ContainerType ORDER BY Description",0 , "id");
	} elseif($_GET['edit'] == 'Users') {
	$select = createDropDownBox("SELECT User, id FROM Users", 0, "id");
	}

?>
<form name="editTable" action="EditGeneric.php" method="get">
	<input type="hidden" value="<?php echo $_GET['edit'] ?>" name="table">
	<select name="itemID">
		<option value="new">(New Item)</option> 
		<?php echo $select; //prints dropdown box created above?> 
	</select>
	<br><input type="submit" value="Edit Item" name="edit"> 
	<br><input type="submit" value="Remove Item" name="delete">
	<br><input type="submit" value="View Entire Table" name="tableDump">
</form>
<?php require('./View/Footer.php'); ?>
